import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    Uname:sessionStorage.getItem('Uname'),
  },
  mutations: {
      UpdateName(state,name){
        this.state.Uname = name
        if(name==null){
          sessionStorage.removeItem('Uname')
          sessionStorage.removeItem('UserID')
          // this.state.Uname=name
        }else{
          sessionStorage.setItem("Uname",name)
        }
      },
  },
  actions: {
  },
  modules: {
  },
  getters:{
    
  }
})
